package com.mingtu.dzpatrol.utils;

import android.view.Gravity;

import com.blankj.utilcode.util.ToastUtils;
import com.mingtu.dzpatrol.R;
import com.mingtu.dzpatrol.base.BaseApplication;

/**
 * @ClassName :
 * @Author : wkk
 * @Date : 2022-8-16 18:24:02
 * @Email : 1281573890@qq.com
 * @Eescription :
 */
public class MyToastUtils {

    public static void showError(String str) {
        ToastUtils.make()
                .setBgColor(BaseApplication.getContext().getResources().getColor(R.color.red_fc))
                .setTextColor(BaseApplication.getContext().getResources().getColor(R.color.white))
                .setGravity(Gravity.CENTER, 0, 0)
                .show(str);
    }

    public static void showSuccess(String str) {
        ToastUtils.make()
                .setBgColor(BaseApplication.getContext().getResources().getColor(R.color.colorPrimary))
                .setTextColor(BaseApplication.getContext().getResources().getColor(R.color.white))
                .setGravity(Gravity.CENTER, 0, 0)
                .show(str);
    }


    public static void showInfo(String str) {
        ToastUtils.make()
                .setBgColor(BaseApplication.getContext().getResources().getColor(R.color.bg_color_fba))
                .setTextColor(BaseApplication.getContext().getResources().getColor(R.color.white))
                .setGravity(Gravity.CENTER, 0, 0)
                .show(str);
    }
}
